package com.itheima.Thread.Thread类;

public class Demo2 {
    public static void main(String[] args) {
        th0 t1 = new th0();
        t1.setName("+++选手");
        th0 t2 = new th0("*选手");
        t1.start();
        t2.start();


    }
}

class th0 extends Thread {
    public th0() {
    }

    public th0(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i = 0; i <= 50; i++) {
            System.out.println(getName()+ "跑到"+i);
        }
    }
}